<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <title>记事本项目</title>
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
</head>
<script src="js/vue.global.js"></script>
<script src="js/axios.min.js"></script>
<script src="js/http.js"></script>

<body>
    测试表格
    <div id="app">
        <table>
            <thead>
                <td>id</td>
                <td>批次号</td>
                <td>备注</td>
            </thead>
            <tbody>
                <tr v-for="item in list">
                    <td>{{item.id}}</td>
                    <td>{{item.batch}}</td>
                    <td>{{item.remark}}</td>
                </tr>
            </tbody>
        </table>
    </div>
</body>

<script>

    const { createApp, ref } = Vue;
    const app = {
        data() {
            return {
                name: "hello",
                list:[]
            }
        },
        watch: {},
        methods: {
            loadData() {
                httpGet("/list", res=> {
                    this.list=res.list
                })
            },
        },
        created() {
            this.loadData()
        },
    }
    createApp(app).mount('#app')

</script>

</html>